package D12_3;

public abstract class yueqilei {
    private String name;
    public yueqilei(String name){
        this.name=name;
    }
    public String getName() {
        return name;
    }
    public abstract void Playing();
}
class Gita extends yueqilei{
    public Gita(){
        super("吉他");
    }

    @Override
    public void Playing() {
        System.out.println(getName()+"正在演奏....");
    }
}
class Piano extends yueqilei{
    public Piano(){
        super("钢琴");
    }

    @Override
    public void Playing() {
        System.out.println(getName()+"正在演奏....");
    }
}
